﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Saliss.Master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="HodhodNews.Web.Register" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div onclick="viewFreeAccount();" runat="server" id="btnFree" style="width: 200px; background-color: rgb(253,214,49);
        margin: 10px; float: right; border-radius: 7px; padding: 15px; cursor: pointer;
        font-family: traditional Arabic; font-size: 22px; font-weight: bold; text-align: center">
        حساب مجاني
    </div>
    <div onclick="viewPaidAccount();" runat="server" id="btnPaid" style="width: 200px; background-color: rgb(182,230,5);
        margin: 10px; float: right; border-radius: 7px; padding: 15px; cursor: pointer;
        font-family: traditional Arabic; font-size: 22px; font-weight: bold; text-align: center">
        حساب مميز مدفوع
    </div>
    <br style="clear: both" />
    <asp:CreateUserWizard ID="cuwPaid" runat="server" OnContinueButtonClick="CreateUserWizard1_ContinueButtonClick"
        CreateUserButtonText="إنشاء الحساب" OnCreatingUser="cuwPaid_CreatingUser" 
        oncreateduser="cuwPaid_CreatedUser">
        <WizardSteps>
            <asp:CreateUserWizardStep runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td align="center" colspan="2" style="padding: 7px; background-color: rgb(182,230,5)">
                                تسجيل حسابك&nbsp; مميز مدفوع في هدهد الأنباء
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">اسم المستخدم</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                    ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="cuwPaid">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">كلمة السر:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                    ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="cuwPaid">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">تأكيد كلمة السر:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                    ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                    ValidationGroup="cuwPaid">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">البريد الالكتروني</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                    ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="cuwPaid">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                كود بطاقة الدفع:
                            </td>
                            <td>
                                <asp:TextBox ID="txtPaymentCode" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvPaymentCode0" runat="server" ControlToValidate="txtPaymentCode"
                                    ToolTip="Payment is required." ErrorMessage="*" ValidationGroup="cuwPaid">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                    ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                    ValidationGroup="cuwPaid"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2" style="color: Red;">
                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep runat="server" />
        </WizardSteps>
    </asp:CreateUserWizard>
    <asp:CreateUserWizard ID="cuwFree" style="display:none" runat="server" OnContinueButtonClick="CreateUserWizard1_ContinueButtonClick"
        CreateUserButtonText="إنشاء الحساب" oncreateduser="cuwFree_CreatedUser" >
        <WizardSteps>
            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td align="center" colspan="2" style="padding: 7px; background-color: rgb(253,214,49)">
                                تسجيل حسابك&nbsp; مجاني في هدهد الأنباء
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">اسم المستخدم</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                    ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="cuwFree">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">كلمة السر:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                    ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="cuwFree">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">تأكيد كلمة السر:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                    ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                    ValidationGroup="cuwFree">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">البريد الالكتروني</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                    ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="cuwFree">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        
                        <tr>
                            <td align="center" colspan="2">
                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                    ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                    ValidationGroup="cuwFree">
                                </asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2" style="color: Red;">
                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server" />
        </WizardSteps>
    </asp:CreateUserWizard>
    <script type="text/javascript">
        var cuwFree = document.getElementById('<%= cuwFree.ClientID%>');
        var cuwPaid = document.getElementById('<%= cuwPaid.ClientID%>');
        var btnFree = document.getElementById('<%= btnFree.ClientID %>');
        var btnPaid = document.getElementById('<%= btnPaid.ClientID%>');

        function viewFreeAccount() {
            cuwPaid.style.display = 'none';
            btnFree.style.display = 'none';
            btnPaid.style.display = 'none';
            cuwFree.style.display = '';
        }
        function viewPaidAccount() {
            btnPaid.style.display = 'none';
            btnFree.style.display = 'none';
            cuwFree.style.display = 'none';
            cuwPaid.style.display = '';
        }
    </script>
</asp:Content>
